<?php
/*................................................................
[七行 PHPCMS]
 .  VERSION: 1.0
 .  Author: SevenEl sevenelement@qq.com
 .  Support: http://www.sevenel.cn
................................................................*/
/*
 loading tree (8ika)..

*/
$arr=array('enableDD'=>'false','id'=>'div_tree');
function tree($arr){
	$arg=func_get_args();
	$arg=$arg[0];
echo <<<EQT
var Tree = Ext.tree;
	// set the root node
	var root3 = new Tree.AsyncTreeNode({
		text: 'isrn@qq.com',
		draggable:false,
		id:'root3'
	});

	var tree = new Tree.TreePanel({
		el:'tree3',
		autoScroll:true,
		root:root3,
		animate:true,
		enableDD:{$arg[enableDD]},
		border:false,
		rootVisible:false,
		containerScroll: true,
		loader: new Tree.TreeLoader({
			dataUrl:'../treedata.php?node=root3'
		})
	});

    tree.setRootNode(root3);
	// render the tree
	tree.render();
	root.expand();
	tree.on('click',treeClick);


EQT;
}
?>
